home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CDsupport / IDer / Routines / DoFiles.s < prev    next >
Text File  |  1997-02-18  |  1KB  |  50 lines

  1. DoFiles:    Include    Routines/GetCurrentName.s
  2.     Include    Routines/GetFileData.s
  3.  
  4. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  5. CheckLoop:    Move.W    #NOCONFIGENTRY,_ErrorCode
  6.     Move.L    _ConfigCurPos(PC),A0
  7.     Lea    ConfigLine,A1
  8.     Move.B    #' ',(A1)+        ;we need space at the start to act as a identifier
  9. .CheckCopy    Move.B    (A0)+,D0
  10.     Beq    LaunchDone
  11.     Move.B    D0,(A1)+
  12.     Cmp.B    #10,D0        ;each class entry appears on one complete line
  13.     Bne.S    .CheckCopy
  14.     Clr.B    -1(A1)        ;mark the end of the entry
  15.     Move.L    A0,_ConfigCurPos
  16.     Clr.W    _ErrorCode
  17.  
  18. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  19.     Move.B    ConfigLine+1,D0        ;check to see if the line has a comment
  20.     Cmp.B    #';',D0        ;identifier #1
  21.     Beq.S    CheckLoop        ;skip if comment start found
  22.     Cmp.B    #'#',D0        ;identifier #2
  23.     Beq.S    CheckLoop        ;skip if comment start found
  24.  
  25.     Bsr    ParseConfig        ;work out what entries are provided, and where they are
  26.     Bsr    ProcessFlags        ;set the various control options
  27.  
  28.     Tst.L    _Class        ;was it a valid line.
  29.     Beq.S    CheckLoop
  30.     Tst.L    _Action        ;does it have something for use to do
  31.     Beq.S    CheckLoop
  32.  
  33. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  34.     Include    Routines/ProcessSuffix.s
  35.     Include    Routines/ProcessName.s
  36.     Include    Routines/ProcessOffset.s
  37.     Include    Routines/LaunchAction.s
  38.  
  39. LaunchDone:    Tst.W    _ErrorCode
  40.     Beq.S    .NoErrors
  41.     Bsr    ErrorHandler
  42.     Clr.W    _ErrorCode
  43.  
  44. .NoErrors    Bsr    Cleanup
  45.     Subq.W    #1,_LoopCount
  46.     Bgt    DoFiles
  47.  
  48. LaunchFinished:    Bsr    Cleanup
  49.     Rts
  50.